#!/bin/bash

sdev_name="sdb"
modinfo="$(lsmod | grep sdkp)"
if [ -n "${modinfo}" ]
then
    rmmod sdkp
fi

make clean
make
if [ $? -ne 0 ]
then
    exit 0
fi

dmesg -c > /dev/null 2>&1
echo "==================================================="
echo "sdev_name=${sdev_name}"
insmod sdkp.ko g_devpath=/dev/${sdev_name}
dmesg
echo "==================================================="
